package com.lq.ecoldchain.ui.mine.certification

import com.lq.ecoldchain.base.CommonLoadingViewModel
import org.kodein.di.Kodein
import org.kodein.di.android.support.AndroidLifecycleScope
import org.kodein.di.generic.bind
import org.kodein.di.generic.instance
import org.kodein.di.generic.scoped
import org.kodein.di.generic.singleton

/*
*2019/1/3 0003  14:27
*function by lq
*/
val certificationModule = Kodein.Module("Certification_Kodein_Module"){
    bind<CertificationViewModel>() with scoped(AndroidLifecycleScope).singleton {
        CertificationViewModel()
    }

    bind<CertificationDelegate>() with scoped(AndroidLifecycleScope).singleton {
        CertificationDelegate(
                viewModel = instance(),
                loadingViewModel = CommonLoadingViewModel.instance(context)
        )
    }
}